package com.cj.pj.sys.common.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class JsonResult implements Serializable {
    private static final long serialVersionUID = 8734384984475609024L;
    private int state=1;
    private Object data;
    private String message="ok";
    public JsonResult(Object data) {
        this.data = data;
    }

    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Throwable e ) {
        this.state = 0;
        this.message = e.getMessage();
    }

}
